# 该镜像需要依赖的基础镜像
FROM centos
#设置jdk环境变量
ENV JAVA_HOME=/home/java/java/jdk-11
ENV PATH=$JAVA_HOME/bin:$PATH
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib
# 将targer目录下的jar包复制 到 docker容器（reverse容器）目录下面/home/springboot
ADD ./target/kafdrop-3.31.0-SNAPSHOT.jar /home/springboot/kafka-web.jar
# 声明服务运行在29092端口
EXPOSE 29092
# 执行命令
CMD ["java","-Xms64m","-Xmx256m","-Dloader.path=/home/java/dependency","-Dfile.encoding=UTF-8","-Duser.timezone=GMT+08","--add-opens=java.base/sun.nio.ch=ALL-UNNAMED","-jar","/home/springboot/kafka-web.jar","--kafka.brokerConnect=101.43.192.189:9092"]
# 指定维护者名称
MAINTAINER Mirror sean